using System;
using System.ServiceModel;
using Kiwi.Container.DependencyInjection;

namespace Kiwi.Container.Wcf
{
    public class DependencyInjectionServiceHost: ServiceHost
    {
        protected DependencyInjectionServiceHost()
        {
        }

        public DependencyInjectionServiceHost(Type serviceType, params Uri[] baseAddresses) : base(serviceType, baseAddresses)
        {
        }

        public DependencyInjectionServiceHost(object singletonInstance, params Uri[] baseAddresses) : base(singletonInstance, baseAddresses)
        {
        }

        protected override void OnOpening()
        {
            base.OnOpening();
            Description.Behaviors.Add(new DependencyInjectionServiceBehavior(Properties.Unset));
        }
    }
}